package cn.easy.mortgage;

import cn.easy.base.utils.coder.Builder;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * Created by chen on 2015/10/9.
 */
public class CoderBuilder {


    public static void main(String[] args) throws Exception{
        buildCode(args);
    }

    public static void buildCode(String[] args) {
        ApplicationContext ctx = SpringApplication.run(Application.class, args);

//        new Builder("ywzc_archive", "mortgage", "cn.easy.mortgage", ctx.getBean(JdbcTemplate.class)).run();
//        new Builder("ywzc_lending", "mortgage", "cn.easy.mortgage", ctx.getBean(JdbcTemplate.class)).run();
//        new Builder("ywzc_report_norm_one", "mortgage", "cn.easy.mortgage", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
//        new Builder("ywzc_report_norm_two", "mortgage", "cn.easy.mortgage", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
//        new Builder("ywzc_re_report_norm", "mortgage", "cn.easy.mortgage", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();
        new Builder("ywzc_project_customer_risk", "mortgage", "cn.easy.mortgage", ctx.getBean(JdbcTemplate.class)).buildDomain().buildService().buildDao().buildI18n();

        SpringApplication.exit(ctx);
    }
}
